
from flask_login import UserMixin
from werkzeug.security import generate_password_hash, check_password_hash
from applications.extensions import db

class PoliceModels(db.Model):
    __tablename__ = 'administrator_police'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='警员编号')
    name = db.Column(db.String(20), comment='警员姓名')
    state = db.Column(db.Integer, comment='课程参与状态')
    score = db.Column(db.Integer,  comment='综合评分')
    department = db.Column(db.String(20), comment='部门')
    condition = db.Column(db.String(10), comment='心理健康状况')
    pressure_category = db.Column(db.String(10), comment='压力类别')
    registration_time = db.Column(db.DateTime, comment='注册时间')
    update_time_time = db.Column(db.DateTime, comment='注册时间')


class PoliceDetail(db.Model):
    __tablename__ = 'police_records'
    id = db.Column(db.Integer, primary_key=True, autoincrement=True, comment='训练记录编号')
    police_id = db.Column(db.Integer,  comment='警员编号')
    class_id = db.Column(db.Integer, comment='课程编号')
    score = db.Column(db.Integer, comment='评分')
    update_time = db.Column(db.DateTime, comment='时间')
